package cf.luobo.covid_19.javaBean.pojo;

import org.apache.commons.collections4.BidiMap;
import org.apache.commons.collections4.bidimap.DualHashBidiMap;

public class Province {
    public static BidiMap<String, String> engToChs = new DualHashBidiMap<>();
    public static String[] provides = {"Taiwan", "Tianjin", "Shaanxi", "Fujian", "Jiangsu", "Liaoning", "Yunnan",
            "Guangdong", "Sichuan", "Shanghai", "Hubei", "Hunan", "Henan", "Beijing", "Neimenggu", "Guangxi",
            "Chongqing", "Macau", "Gansu", "Anhui", "Shandong", "Zhejiang", "Shanxi", "Heilongjiang",
            "Hainan", "Ningxia", "Hebei", "Qinghai", "Jiangxi", "Jilin", "Xizang", "Xinjiang", "Guizhou", "Hongkong"};

    static {
        engToChs.put("Anhui", "安徽");
        engToChs.put("Taiwan", "台湾");
        engToChs.put("Tianjin", "天津");
        engToChs.put("Shaanxi", "陕西");
        engToChs.put("Fujian", "福建");
        engToChs.put("Jiangsu", "江苏");
        engToChs.put("Liaoning", "辽宁");
        engToChs.put("Yunnan", "云南");
        engToChs.put("Guangdong", "广东");
        engToChs.put("Sichuan", "四川");
        engToChs.put("Shanghai", "上海");
        engToChs.put("Hubei", "湖北");
        engToChs.put("Hunan", "湖南");
        engToChs.put("Henan", "河南");
        engToChs.put("Beijing", "北京");
        engToChs.put("Neimenggu", "内蒙古");
        engToChs.put("Guangxi", "广西");
        engToChs.put("Chongqing", "重庆");
        engToChs.put("Macau", "澳门");
        engToChs.put("Gansu", "甘肃");
        engToChs.put("Shandong", "山东");
        engToChs.put("Zhejiang", "浙江");
        engToChs.put("Shanxi", "山西");
        engToChs.put("Heilongjiang", "黑龙江");
        engToChs.put("Hainan", "海南");
        engToChs.put("Ningxia", "宁夏");
        engToChs.put("Hebei", "河北");
        engToChs.put("Qinghai", "青海");
        engToChs.put("Jiangxi", "江西");
        engToChs.put("Jilin", "吉林");
        engToChs.put("Xizang", "西藏");
        engToChs.put("Xinjiang", "新疆");
        engToChs.put("Guizhou", "贵州");
        engToChs.put("Hongkong", "香港");
    }

    private String name;                //省份名称
    private String chinesename;         //省份中文名
    private int currentConfirmedCount;  //确诊人数
    private int cured;                  //治愈人数
    private int dead;                   //死亡人数
    private int suspected;              //疑似人数

    public Province() {
    }

    @Override
    public String toString() {
        return "Province{" +
                "name='" + name + '\'' +
                ", chinesename='" + chinesename + '\'' +
                ", currentConfirmedCount=" + currentConfirmedCount +
                ", cured=" + cured +
                ", dead=" + dead +
                ", suspected=" + suspected +
                '}';
    }

    public Province(String name, int currentConfirmedCount, int cured, int dead, int suspected) {
        this.name = name;
        this.currentConfirmedCount = currentConfirmedCount;
        this.cured = cured;
        this.dead = dead;
        this.suspected = suspected;
        this.chinesename = engToChs.get(name);
    }

    public String getChinesename() {
        return chinesename;
    }

    public void setChinesename(String chinesename) {
        this.chinesename = chinesename;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCurrentConfirmedCount() {
        return currentConfirmedCount;
    }

    public void setCurrentConfirmedCount(int currentConfirmedCount) {
        this.currentConfirmedCount = currentConfirmedCount;
    }

    public int getCured() {
        return cured;
    }

    public void setCured(int cured) {
        this.cured = cured;
    }

    public int getDead() {
        return dead;
    }

    public void setDead(int dead) {
        this.dead = dead;
    }

    public int getSuspected() {
        return suspected;
    }

    public void setSuspected(int suspected) {
        this.suspected = suspected;
    }
}
